.class Lcom/waiqin365/lightapp/im/activity/cn;
.super Landroid/widget/BaseAdapter;


# instance fields
.field public a:Z

.field final synthetic b:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

.field private c:Z

.field private d:Z

.field private e:I

.field private f:Ljava/util/ArrayList;

.field private g:Landroid/content/Context;


# direct methods
.method public constructor <init>(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;Landroid/content/Context;ILjava/util/ArrayList;)V
    .locals 3

    const/4 v0, 0x0

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/activity/cn;->b:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    iput-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->c:Z

    iput-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->d:Z

    iput-object p4, p0, Lcom/waiqin365/lightapp/im/activity/cn;->f:Ljava/util/ArrayList;

    iput p3, p0, Lcom/waiqin365/lightapp/im/activity/cn;->e:I

    iput-object p2, p0, Lcom/waiqin365/lightapp/im/activity/cn;->g:Landroid/content/Context;

    invoke-static {p1}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->f(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;)Lcom/hyphenate/chat/EMGroup;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMGroup;->getOwner()Ljava/lang/String;

    move-result-object v1

    invoke-static {}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->b()Lcom/fiberhome/gaea/client/base/ExmobiApp;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->c()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    iput-boolean v1, p0, Lcom/waiqin365/lightapp/im/activity/cn;->c:Z

    invoke-static {p1}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->f(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;)Lcom/hyphenate/chat/EMGroup;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMGroup;->isAllowInvites()Z

    move-result v1

    if-nez v1, :cond_0

    invoke-static {p1}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->f(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;)Lcom/hyphenate/chat/EMGroup;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMGroup;->getOwner()Ljava/lang/String;

    move-result-object v1

    invoke-static {}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->b()Lcom/fiberhome/gaea/client/base/ExmobiApp;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->c()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    :cond_0
    const/4 v0, 0x1

    :cond_1
    iput-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->d:Z

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/im/activity/cn;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->g:Landroid/content/Context;

    return-object v0
.end method


# virtual methods
.method public a(Ljava/util/ArrayList;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/activity/cn;->f:Ljava/util/ArrayList;

    return-void
.end method

.method public getCount()I
    .locals 4

    const/4 v1, 0x1

    const/4 v2, 0x0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->f:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v3

    iget-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->c:Z

    if-eqz v0, :cond_0

    move v0, v1

    :goto_0
    add-int/2addr v0, v3

    iget-boolean v3, p0, Lcom/waiqin365/lightapp/im/activity/cn;->d:Z

    if-eqz v3, :cond_1

    :goto_1
    add-int/2addr v0, v1

    return v0

    :cond_0
    move v0, v2

    goto :goto_0

    :cond_1
    move v1, v2

    goto :goto_1
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->f:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 6

    const/4 v4, 0x0

    const/4 v3, 0x4

    const/4 v5, 0x0

    if-nez p2, :cond_0

    new-instance v1, Lcom/waiqin365/lightapp/im/activity/cv;

    invoke-direct {v1, v4}, Lcom/waiqin365/lightapp/im/activity/cv;-><init>(Lcom/waiqin365/lightapp/im/activity/bo;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->g:Landroid/content/Context;

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iget v2, p0, Lcom/waiqin365/lightapp/im/activity/cn;->e:I

    invoke-virtual {v0, v2, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    const v0, 0x7f0c07ed

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/activity/cv;->a:Landroid/widget/ImageView;

    const v0, 0x7f0c07ee

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/activity/cv;->b:Landroid/widget/TextView;

    const v0, 0x7f0c07eb

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/activity/cv;->c:Landroid/widget/RelativeLayout;

    invoke-virtual {p2, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    :goto_0
    iget-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->c:Z

    if-eqz v0, :cond_3

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/cn;->getCount()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    if-ne p1, v0, :cond_3

    iget-object v0, v1, Lcom/waiqin365/lightapp/im/activity/cv;->b:Landroid/widget/TextView;

    const-string/jumbo v2, ""

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/im/activity/cv;->a:Landroid/widget/ImageView;

    const v2, 0x7f02023a

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setImageResource(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->b:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->f(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;)Lcom/hyphenate/chat/EMGroup;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMGroup;->getOwner()Ljava/lang/String;

    move-result-object v0

    invoke-static {}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->b()Lcom/fiberhome/gaea/client/base/ExmobiApp;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->c()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_1

    invoke-virtual {p2, v3}, Landroid/view/View;->setVisibility(I)V

    :goto_1
    return-object p2

    :cond_0
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/im/activity/cv;

    move-object v1, v0

    goto :goto_0

    :cond_1
    iget-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->a:Z

    if-eqz v0, :cond_2

    invoke-virtual {p2, v3}, Landroid/view/View;->setVisibility(I)V

    :goto_2
    iget-object v0, v1, Lcom/waiqin365/lightapp/im/activity/cv;->a:Landroid/widget/ImageView;

    new-instance v1, Lcom/waiqin365/lightapp/im/activity/co;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/activity/co;-><init>(Lcom/waiqin365/lightapp/im/activity/cn;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto :goto_1

    :cond_2
    invoke-virtual {p2, v5}, Landroid/view/View;->setVisibility(I)V

    goto :goto_2

    :cond_3
    iget-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->c:Z

    if-eqz v0, :cond_4

    iget-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->d:Z

    if-eqz v0, :cond_4

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/cn;->getCount()I

    move-result v0

    add-int/lit8 v0, v0, -0x2

    if-eq p1, v0, :cond_5

    :cond_4
    iget-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->c:Z

    if-nez v0, :cond_8

    iget-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->d:Z

    if-eqz v0, :cond_8

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/cn;->getCount()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    if-ne p1, v0, :cond_8

    :cond_5
    iget-object v0, v1, Lcom/waiqin365/lightapp/im/activity/cv;->b:Landroid/widget/TextView;

    const-string/jumbo v2, ""

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/im/activity/cv;->a:Landroid/widget/ImageView;

    const v2, 0x7f020237

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setImageResource(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->b:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->f(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;)Lcom/hyphenate/chat/EMGroup;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMGroup;->isAllowInvites()Z

    move-result v0

    if-nez v0, :cond_6

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->b:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->f(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;)Lcom/hyphenate/chat/EMGroup;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMGroup;->getOwner()Ljava/lang/String;

    move-result-object v0

    invoke-static {}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->b()Lcom/fiberhome/gaea/client/base/ExmobiApp;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->c()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_6

    invoke-virtual {p2, v3}, Landroid/view/View;->setVisibility(I)V

    goto :goto_1

    :cond_6
    iget-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/cn;->a:Z

    if-eqz v0, :cond_7

    invoke-virtual {p2, v3}, Landroid/view/View;->setVisibility(I)V

    :goto_3
    iget-object v0, v1, Lcom/waiqin365/lightapp/im/activity/cv;->a:Landroid/widget/ImageView;

    new-instance v1, Lcom/waiqin365/lightapp/im/activity/cp;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/activity/cp;-><init>(Lcom/waiqin365/lightapp/im/activity/cn;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto/16 :goto_1

    :cond_7
    invoke-virtual {p2, v5}, Landroid/view/View;->setVisibility(I)V

    goto :goto_3

    :cond_8
    invoke-virtual {p0, p1}, Lcom/waiqin365/lightapp/im/activity/cn;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/utils/e;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/activity/cn;->g:Landroid/content/Context;

    invoke-static {v0, v3}, Lcom/waiqin365/lightapp/im/utils/e;->a(Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v3

    iget-object v4, p0, Lcom/waiqin365/lightapp/im/activity/cn;->g:Landroid/content/Context;

    invoke-static {v0, v4}, Lcom/waiqin365/lightapp/im/utils/e;->b(Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    iget-object v4, v1, Lcom/waiqin365/lightapp/im/activity/cv;->b:Landroid/widget/TextView;

    invoke-virtual {v4, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-virtual {p2, v5}, Landroid/view/View;->setVisibility(I)V

    iget-object v3, v1, Lcom/waiqin365/lightapp/im/activity/cv;->a:Landroid/widget/ImageView;

    invoke-virtual {v3, v5}, Landroid/widget/ImageView;->setVisibility(I)V

    if-eqz v0, :cond_9

    const-string/jumbo v3, ""

    invoke-virtual {v3, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_9

    const-string/jumbo v3, "0"

    invoke-virtual {v3, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_9

    invoke-static {}, Lcom/waiqin365/base/login/mainview/a;->a()Lcom/waiqin365/base/login/mainview/a;

    move-result-object v3

    iget-object v4, p0, Lcom/waiqin365/lightapp/im/activity/cn;->b:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-virtual {v3, v4}, Lcom/waiqin365/base/login/mainview/a;->m(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v3

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string/jumbo v4, "/"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string/jumbo v4, "/"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string/jumbo v4, "face"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string/jumbo v4, "/"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string/jumbo v4, ".jpg?timestamp="

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/activity/cn;->b:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-static {v3}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->a(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;)Landroid/content/Context;

    move-result-object v3

    iget-object v4, v1, Lcom/waiqin365/lightapp/im/activity/cv;->a:Landroid/widget/ImageView;

    invoke-static {v3, v4, v0}, Lcom/fiberhome/gaea/client/d/k;->a(Landroid/content/Context;Landroid/widget/ImageView;Ljava/lang/String;)V

    :goto_4
    iget-object v0, v1, Lcom/waiqin365/lightapp/im/activity/cv;->a:Landroid/widget/ImageView;

    new-instance v3, Lcom/waiqin365/lightapp/im/activity/cq;

    invoke-direct {v3, p0, v2}, Lcom/waiqin365/lightapp/im/activity/cq;-><init>(Lcom/waiqin365/lightapp/im/activity/cn;Ljava/lang/String;)V

    invoke-virtual {v0, v3}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/im/activity/cv;->a:Landroid/widget/ImageView;

    new-instance v1, Lcom/waiqin365/lightapp/im/activity/cr;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/activity/cr;-><init>(Lcom/waiqin365/lightapp/im/activity/cn;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    goto/16 :goto_1

    :cond_9
    iget-object v0, v1, Lcom/waiqin365/lightapp/im/activity/cv;->a:Landroid/widget/ImageView;

    const v3, 0x7f020263

    invoke-virtual {v0, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_4
.end method
